﻿/*-------------------------------------------------------------------------
* 命名空间: XrayDirection.ValueConverters/GetTypeConverter
* 类       名: GetTypeConverter
* 功      能:  获取类型名称的转换类,根据类型获取其对应的类型名称
* 时      间:  2023/12/27 16:11:11
* 版      本:  V1.0
* 作      者:  Fioman
* 格      言:  Talk is cheap,show me the code ^_^
*-------------------------------------------------------------------------*/
using System;
using System.Globalization;

namespace XrayDirection.ValueConverters
{
    public class GetTypeConverter : OneWayConverter
    {
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value?.GetType() ?? targetType;
        }
    }
}
